#include<bits/stdc++.h>

using namespace std;

//庖丁解牛字符串处理
int main() {
    char a[100] = "00";
    cin >> a + 2;
    int n = strlen(a);
    int w = n / 3;
    int x, y, z;
    sscanf(a + n - w, "%d", &z);
    a[n - w] = '\0';//NULL
    sscanf(a + n - 2 * w, "%d", &y);
    a[n - 2 * w] = 0;
    sscanf(a, "%d", &x);
    cout << x << " " << y << " " << z << endl;
    return 0;
}
